package cn.littlehx.spring_boot_test2_2.repository;

import cn.littlehx.spring_boot_test2_2.domain.Teacher;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;


public interface TeacherRepository extends JpaRepository<Teacher, Integer> {

    /**
     * 按照名字进行查询
     * @param name
     * @return
     */
    List<Teacher> findByNameLike(String name);

    /**
     * 按照名字和密码进行查询
     * @param name
     * @param password
     * @return
     */
    List<Teacher> findByNameAndPassword(String name, String password);



}
